package com.songcha.module_task.api


import com.songcha.library_network.bean.BaseBean
import com.songcha.library_network.bean.BaseIntDataBean
import com.songcha.module_task.bean.DailyTaskBean
import com.songcha.module_task.bean.SignDayNumberBean
import com.songcha.module_task.bean.SignTaskBean
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface TaskApiService {

    @GET("/api/getSigninTask")
    fun getSignTask():Observable<SignTaskBean>

    @GET("/api/token/signin")
    fun sign():Observable<BaseBean>

    @POST("/api/getEverydayTask")
    fun getDailyTask(@Body body:RequestBody):Observable<DailyTaskBean>

    @GET("/api/token/updateEverydayTask/{everydayTaskId}")
    fun completeTask(@Path("everydayTaskId") taskId:Int):Observable<BaseIntDataBean>

    //get user continuous sign day
    @GET("/api/token/computeSigninNumber")
    fun getUserSignDay():Observable<SignDayNumberBean>

}